package cn.gson.school.entity.xitong;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name = "tb_xt_log")
public class XtLogEntity {

	/**
	 * 日志id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long logId;
	/**
	 * 操作时间
	 */
	@Column(name = "log_time")
	@JsonFormat(pattern = "yyyy-MM-ddHH:mm:ss")
	private Date logTime;

	// 用户编号
	@ManyToOne
	@JoinColumn(name = "user_id")
	private UserEntity userId;

	// 操作内容
	@Column(name = "log_content")
	private String logContent;

	public Long getLogId() {
		return logId;
	}

	public void setLogId(Long logId) {
		this.logId = logId;
	}

	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	public UserEntity getUserId() {
		return userId;
	}

	public void setUserId(UserEntity userId) {
		this.userId = userId;
	}

	public String getLogContent() {
		return logContent;
	}

	public void setLogContent(String logContent) {
		this.logContent = logContent;
	}

	@Override
	public String toString() {
		return "XtLogEntity [logId=" + logId + ", logTime=" + logTime + ", userId=" + userId + ", logContent="
				+ logContent + "]";
	}

}
